const dns2 = require('dns2');

const options = {
  // available options
  // dns: dns server ip address or hostname (string),
  dns:'121.36.98.88',
  // port: dns server port (number),
  port:'53',
  // recursive: Recursion Desired flag (boolean, default true, since > v1.4.2)
  recursive:false
};
const dns = new dns2(options);

(async () => {
  const result = await dns.resolveA('baidu.com');
  console.log(result)
  console.log(result.answers);
})();